package com.twu.biblioteca.view.movie;

import com.twu.biblioteca.model.BibliotecaMovie;

import java.util.List;

public class ListMovieView {
    private static String title = "name    year   director    rating\n";
    public static String transformToString(List<BibliotecaMovie> movieList) {
        String result = "";
        for (BibliotecaMovie movie:movieList){
            result = result+ movie.getName()+"   "+movie.getYear()+"   "+movie.getDirector()+"   "+movie.getRating()+"\n";
        }
        return title+result;
    }
}
